package 第一讲基础算法;

import java.util.Scanner;

public class AcWing797 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int m=sc.nextInt();
		int[] a=new int[n+1];
		for(int i=1;i<=n;i++) {
			a[i]=sc.nextInt();
		}
		int[] diff=new int[n+1];
		for(int i=1;i<=n;i++) {
			diff[i]=a[i]-a[i-1];
		}
		while(m-->0) {
			int l=sc.nextInt();
			int r=sc.nextInt();
			int c=sc.nextInt();
			add(diff,l,r,c);
		}
		sc.close();
		int[] res=new int[n+1];
		for(int i=1;i<=n;i++) {
			res[i]=res[i-1]+diff[i];
		}
		for(int i=1;i<=n;i++) {
			System.out.print(res[i]+" ");
		}

	}
	public static void add(int[] diff,int l,int r,int c) {
		diff[l]+=c;
		if(r+1<diff.length) {
			diff[r+1]-=c;
		}
	}

}
